<link rel="stylesheet" type="text/css" href="/stylesheet/jquery.fancybox-1.3.4.css" />
<script type="text/javascript" src="/javascript/jquery.fancybox-1.3.4.pack.js"></script>
<?php 
	list($category_id) = array_keys($product["category_ids"]);
	$category_name = array_shift($product["category_ids"]);
?>
<div class="price"><span class="currency">preporučena cena:</span> <?= number_format($product["price"], 2, ",", "."); ?><span class="currency"><?= CURRENCY_LABEL ?></span></div>
<h1><a class="breadcrumb" href="/category/show/<?= $category_id ?>/<?= urlize($category_name) ?>"><?= $category_name ?><span> &raquo;</span></a> <?= $product["name"] ?></h1>
<p>
	<strong>kôd:</strong> <?= $product["code"] ?>
</p>

<ul class="clean gallery">
	<? foreach($product["images"] as $k=>$image): ?>
	<li>
		<? $src = "/image/products/". $product["id"] . "/" . $image["src"] ?>
		<a title="<?= $product["name"] ?><?= strlen(trim($image["description"])) ? ": " . htmlentities($image["description"], ENT_QUOTES, "UTF-8") : "" ?>" href="<?=$src ?>"><img src="<?=$src ?>?w=100&h=100&bg=white" /></a>
	</li>
	<? endforeach; ?>
</ul>
<?php //_dump($product); ?>
<script type="text/javascript">
$(function(){
	$("ul.gallery a").attr("rel","gallery").fancybox({
		/*transitionIn: 'elastic',
		transitionOut: 'elastic',*/
		autoDimensions: false,
		autoScale:false,
		cyclic:true,
		width: 400,
		height:300,
		speedIn: 600, 
		speedOut: 200, 
		overlayShow: true,
		titlePosition:'over'
	});
});
</script>